home *** CD-ROM | disk | FTP | other *** search
/ HaCKeRz Kr0nlcKLeZ 1 / HaCKeRz Kr0nlcKLeZ.iso / chibacity / factor.txt / text0000.txt < prev   
Encoding:
Text File  |  1996-04-23  |  11.2 KB  |  238 lines

  1. ((Comments are appreciated.  -Bruce))
  2.  
  3.  
  4. Factoring large numbers is hard.  Unfortunately for algorithm
  5. designers, it is getting easier.  Even worse, it is getting
  6. easier faster than mathematicians expected.  In 1976 Richard Guy
  7. wrote: "I shall be surprised if anyone regularly factors numbers
  8. of size 10^80 without special form during the present century." 
  9. In 1977 Ron Rivest said that factoring a 125-digit number would
  10. take 40 quadrillion years.  In 1994 a 129-digit number was
  11. factored.  If there is any lesson in all this, it is that making
  12. predictions is foolish.
  13.  
  14. Table 1 shows factoring records over the past dozen years.  The
  15. fastest factoring algorithm during the time was the quadratic
  16. sieve.
  17.  
  18.          Table 1:  Factoring Using the Quadratic Sieve
  19.  
  20.          year     # of decimal               how many times harder to
  21.                   digits factored            factor a 512-bit number
  22.          1983     71                         > 20 million
  23.          1985     80                         > 2 million
  24.          1988     90                         250,000
  25.          1989     100                        30,000
  26.          1993     120                        500
  27.          1994     129                        100
  28.  
  29. These numbers are pretty frightening.  Today it is not uncommon
  30. to see 512-bit numbers used in operational systems.  Factoring
  31. them, and thereby completely compromising their security, is well
  32. in the range of possibility: A weekend-long worm on the Internet
  33. could do it.
  34.  
  35. Computing power is generally measured in mips-years: a one-
  36. million-instruction-per-second computer running for one year, or
  37. about 3*10^13 instructions.  By convention, a 1 mips machine is
  38. equivalent to the DEC VAX 11/780.  Hence, a mips-year is a VAX
  39. 11/780 running for a year, or the equivalent.
  40.  
  41. The 1983 factorization of a 71-digit number required 0.1 mips-
  42. years; the 1994 factorization of a 129-digit number required
  43. 5000.  This dramatic increase in computing power resulted largely
  44. from the introduction of distributed computing, using the idle
  45. time on a network of workstations.  The 1983 factorization used
  46. 9.5 CPU hours on a single Cray X-MP; the 1994 factorization used
  47. the idle time on 1600 computers around the world for about 8
  48. months.  Modern factoring methods lend themselves to this kind of
  49. distributed implementation.
  50.  
  51. The picture gets even worse.  A new factoring algorithm has taken
  52. over from the quadratic sieve: the general number field sieve. 
  53. In 1989 mathematicians would have told you that the general
  54. number field sieve would never be practical.  In 1992 they would
  55. have told you that it was practical, but only faster than the
  56. quadratic sieve for numbers greater than 130-150 digits or so. 
  57. Today it is known to be faster than the quadratic sieve for
  58. numbers well below 116 digits.  The general number field sieve
  59. can factor a 512-bit number over 10 times faster than the
  60. quadratic sieve.  The algorithm would require less than a year to
  61. run on an 1800-node Intel Paragon.  Table 2 gives the number of
  62. mips-years required to factor numbers of different sizes, given
  63. current implementations of the general number field sieve.
  64.  
  65.          Table 2: Factoring Using the General Number Field Sieve
  66.  
  67.          # of bits         mips-years required to factor
  68.  
  69.          512               30,000
  70.          768               2*10^8
  71.          1024              3*10^11
  72.          1280              1*10^14
  73.          1536              3*10^16
  74.          2048              3*10^20
  75.  
  76. And the general number field sieve is still getting faster. 
  77. Mathematicians keep coming up with new tricks, new optimizations,
  78. new techniques.  There's no reason to think this trend won't
  79. continue.  A related algorithm, the special number field sieve,
  80. can already factor numbers of a certain specialized form--numbers
  81. not generally used for cryptography--must faster than the general
  82. number field sieve can factor general numbers of the same size. 
  83. It is not unreasonable to assume that the general number field
  84. sieve can be optimized to run this fast; it is possible that the
  85. NSA already knows how to do this.  Table 3 gives the number of
  86. mips-years required for the special number field sieve to factor
  87. numbers of different lengths.
  88.  
  89.          Table 3: Factoring Using the Special Number Field Sieve
  90.  
  91.          # of bits         mips-years required to factor
  92.  
  93.          512               < 200
  94.          768               100,000
  95.          1024              3*10^7
  96.          1280              3*10^9
  97.          1536              2*10^11
  98.          2048              4*10^14
  99.  
  100. At a European Institute for System Security workshop in 1992, the
  101. participants agreed that a 1024-bit modulus should be sufficient
  102. for long-term secrets through 2002.  However, they warned: 
  103. "Although the participants of this workshop feel best qualified
  104. in their respective areas, this statement [with respect to
  105. lasting security] should be taken with caution."  This is good
  106. advice.
  107.  
  108. The wise cryptographer is ultra-conservative when choosing
  109. public-key key lengths.  To determine how long a key you need
  110. requires you to look at both the intended security and lifetime
  111. of the key, and the current state-of-the-art of factoring.  Today
  112. you need a 1024-bit number to get the level of security you got
  113. from a 512-bit number in the early 1980s.  If you want your keys
  114. to remain secure for 20 years, 1024 bits is likely too short.
  115.  
  116. Even if your particular secrets aren't worth the effort required
  117. to factor your modulus, you may be at risk.  Imagine an automatic
  118. banking system that uses RSA for security.  Mallory can stand up
  119. in court and say: "Did you read in the newspaper in 1994 that
  120. RSA-129 was broken, and that 512-bit numbers can be factored by
  121. any organization willing to spend a few million dollars and wait
  122. a few months?  My bank uses 512-bit numbers for security, and by
  123. the way I didn't make these seven withdrawals."  Even if Mallory
  124. is lying, the judge will probably put the onus on the bank to
  125. prove it.
  126.  
  127. Earlier I called making predictions foolish.  Now I am about to
  128. make some.  Table 4 gives my recommendations for public-key
  129. lengths, depending on how long you require the key to be secure. 
  130. There are three key lengths for each year, one secure against an
  131. individual, one secure against a major corporation, and the third
  132. secure against a major government.
  133.  
  134. Here are some assumptions from the mathematicians who factored
  135. RSA-129:
  136.  
  137.          We believe that we could acquire 100 thousand machines
  138.          without superhuman or unethical efforts.  That is, we would
  139.          not set free an Internet worm or virus to find resources for
  140.          us.  Many organizations have several thousand machines each
  141.          on the net.  Making use of their facilities would require
  142.          skillful diplomacy, but should not be impossible.  Assuming
  143.          the 5 mips average power, and one year elapsed time, it is
  144.          not too unreasonable to embark on a project which would
  145.          require half a million mips years.
  146.  
  147. The project to factor the 129-digit number harnesses an estimated
  148. 0.03% of the total computing power of the Internet, and they
  149. didn't even try very hard.  It isn't unreasonable to assume that
  150. a well-publicized project can harness 0.1% of the world's
  151. computing power for a year.
  152.  
  153. Assume a dedicated cryptanalyst can get his hands on 10,000 mips-
  154. years, a large corporation can get 10^7 mips-years, and that a
  155. large government can get 10^9 mips-years.  Also assume that
  156. computing power will increase by a factor of ten every five
  157. years.  And finally, assume that advances in factoring
  158. mathematics allows us to factor general numbers at the speeds of
  159. the special number field sieve.  Table 4 recommends different key
  160. lengths for security during different years.
  161.  
  162.          Table 4: Recommended public-key key lengths (in bits)
  163.  
  164.          Year     vs. I             vs. C             vs. G
  165.          1995      768              1280              1536
  166.          2000     1024              1280              1536
  167.          2005     1280              1536              2048
  168.          2010     1280              1536              2048
  169.          2015     1536              2048              2048
  170.  
  171. Remember to take the value of the key into account.  Public keys
  172. are often used to secure things of great value for a long time:
  173. the bank's master key for a digital cash system, the key the
  174. government uses to certify its passports, a notary public's
  175. digital signature key.  It probably isn't worth the effort to
  176. spend months of computing time to break an individual's private
  177. key, but if you can print your own money with a broken key the
  178. idea becomes more attractive.  A 1024-bit key is long enough to
  179. sign something that will be verified within the week, or month,
  180. or even a few years.  But you don't want to stand up in court
  181. twenty years from now with a digitally signed document, and have
  182. the opposition demonstrate how to forge documents with the same
  183. signature.
  184.  
  185. Making predictions beyond the near future is even more foolish. 
  186. Who knows what kind of advances in computing, networking, and
  187. mathematics are going to happen by 2020?  However, if you look at
  188. the broad picture, in every decade we can factor numbers twice as
  189. long as in the previous decade.  This leads to Table 5.
  190.  
  191.          Table 5:  Long-range factoring predictions 
  192.  
  193.          Year     Key length (in bits)
  194.          1995     1024
  195.          2005     2048
  196.          2015     4096
  197.          2025     8192
  198.          2035     16,384
  199.          2045     32,768
  200.  
  201. Not everyone will agree with my recommendations.  The NSA has
  202. mandated 512-bit to 1024-bit keys for their Digital Signature
  203. Standard--far less than I recommend for long-term security.  PGP
  204. has a maximum RSA key length of 1280 bits.  Lenstra, the world's
  205. most successful factorer, refuses to make predictions past ten
  206. years.  And Table 6 gives Ron Rivest's key-length
  207. recommendations, originally made in 1990, which I consider much
  208. too optimistic.  While his analysis looks fine on paper, recent
  209. history illustrates that surprises regularly happen.  It makes
  210. sense to choose your keys to be resilient against future
  211. surprises.
  212.  
  213.          Table 6: Rivest's Optimistic Key-Length Recommendations (In
  214.          Bits)
  215.  
  216.          Year     Low      Avg      High
  217.          1990     398      515      1289
  218.          1995     405      542      1399
  219.          2000     422      572      1512
  220.          2005     439      602      1628
  221.          2010     455      631      1754
  222.          2015     472      661      1884
  223.          2020     489      677      2017
  224.  
  225.          Low estimates assume a budget of $25,000, the quadratic
  226.          sieve algorithm, and a technology advance of 20% per year. 
  227.          Average estimates assume a budget of $25 million, the
  228.          general number field sieve algorithm, and a technology
  229.          advance of 33% per year.  High estimates assume a budget of
  230.          $25 billion, a general quadratic sieve algorithm running at
  231.          the speed of the special number field sieve, and a
  232.          technology advance of 45% per year.
  233.  
  234. There is always the possibility that an advance in factoring will
  235. surprise me as well, but I think that unlikely.  But why trust
  236. me?  I just proved my own foolishness by making predictions.
  237.  
  238.